package com.ttwm.service;

import com.ttwm.dao.OrderDao;
import com.ttwm.pojo.Order;
import com.ttwm.pojo.OrderFood;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImp implements OrderService{
    @Autowired
    private OrderDao orderDao;


    @Override
    public int insertOrder(Order order) {
        return orderDao.insertOrder(order);
    }

    @Override
    public List<Order> allOrder() {
        return orderDao.allOrder();
    }

    @Override
    public List<Order> allOrderToFood(Order order) {
        return orderDao.allOrderToFood(order);
    }


    @Override
    public int updatePayment(Order order) {
        return orderDao.updatePayment(order);
    }

    @Override
    public int deleteOrder(Order order) {
        return orderDao.deleteOrder(order);
    }

    @Override
    public Order oneOrderToFood(Order order) {
        return orderDao.oneOrderToFood(order);
    }

    @Override
    public int updateLocation(Order order) {
        return orderDao.updateLocation(order);
    }


}
